package com.itsci.assignment2;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class ListMenu extends Activity {
	private Button tour;
	private Button vehicle;
	private Button guide;
	private Button book;
	private Button exit;
	private TextView tv;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu_list);
		tv = (TextView)findViewById(R.id.textView_menu_list_ShowUser);
		Intent in = getIntent();
		tv.setText(in.getExtras().getString("user"));
		
		guide = (Button)findViewById(R.id.button_menu_list_BrowseGuide);
		guide.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent gotoGuide = new Intent(ListMenu.this,ListGuide.class);
				startActivity(gotoGuide);
				
			}
		});
		
		vehicle = (Button)findViewById(R.id.button_menu_list_BrowseVehicle);
		vehicle.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent gotoVehicle = new Intent(ListMenu.this,ListVehicle.class);
				startActivity(gotoVehicle);
				
			}
		});
		
		tour = (Button)findViewById(R.id.button_menu_list_BrowseTour);
		tour.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent gotoTour = new Intent(ListMenu.this,ListTravel.class);
				startActivity(gotoTour);
				
			}
		});

	}
}
